<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录</title>
    <!-- Bootstrap core CSS -->
    <link href="/css/bootstrap.css" rel="stylesheet">
    <link href="/css/login.css" rel="stylesheet">
</head>

<body>
    <div class="login">
        <h1><img src="images/gongfanglogo.png" alt="" width="80px"></h1>
        <form method="post">
            <input class="user" type="text" name="u" placeholder="用户名" required="required" />
            <input class="pwd" type="password" name="p" placeholder="密码" required="required" />
            <input class="regpwd pwd dp-n" type="password" name="p" placeholder="确认密码" required="required" />
            <div class="t-box dp-n">
                <img src="images/error.png" alt="" class="t-img">
                <p class="t-color"></p>
            </div>
        </form>
        <button type="submit" class=" btn btn-primary btn-block btn-large">登录</button>
        <button type="submit" class="dp-n regbtn btn-primary btn-block btn-large">注册并登录</button>
        <div class="reg">
            去注册
        </div>
        <div class="gologin dp-n">
            去登录
        </div>
        <!-- 测试post -->
        <!-- <button class="postsubmit">post登陆</button> -->
    </div>
    <!-- 引入公共js文件 -->
    <script src="/js/jquery-3.3.1.min.js"></script>
    <script src="/js/bootstrap.js"></script>
    <script src="/js/login.js"></script>
    <script>
        // 获取登录状态
        var loginType = localStorage.getItem("loginType");
        // 判断是否登录
        if (loginType == 1) {
            window.location.href = "index";
        }
    </script>
</body>

</html>